package cn.wolfcode.wolf2w.member.api;

import cn.wolfcode.wolf2w.common.core.constant.SecurityConstants;
import cn.wolfcode.wolf2w.common.core.domain.R;
import cn.wolfcode.wolf2w.member.api.domain.UserFoandfan;
import cn.wolfcode.wolf2w.member.api.factory.RemoteUserFoandfanFallbackFactory;
import cn.wolfcode.wolf2w.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
* 用户关注与粉丝 远程服务
 *
 * @author dalang
 * @date 2023-12-03
 */
@FeignClient(contextId = "RemoteUserFoandfanService", name = ServiceNameConstants.MEMBER_SERVICE, fallbackFactory = RemoteUserFoandfanFallbackFactory.class)
public interface RemoteUserFoandfanService {

    @GetMapping("/userFoandfans/feign/list")
    R<List<UserFoandfan>> list(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @GetMapping("/userFoandfans/feign/{id}")
    R<UserFoandfan> getOne(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
